package com.uroad.jilinpda.modle;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * 通过蓝牙模块获取卡数据
 *
 * @author Administrator
 *
 */
public class CardInfoMDL implements Serializable {


	/**发卡方标识*/
	private String cardFrom;
	/** 卡区域，在空中请求某个请求接口时，需要用到 */
	private String cardArea;

	private String cardNumber;//不包含卡片网络编号

	/** 卡日期 */
	private String validity;

	/** 车牌号 可能为空 */
	private String plateNum;

	private String startDate;
	private String endDate;

	private String cardType;
	private String cardVersion;
	/**用户类型*/
	private String userType;
	/**车牌颜色*/
	private String plateColor;
	/**车型*/
	private String carType;

	public String getCardType() {
		if (TextUtils.isEmpty(cardType)) {
			return "";
		}
		switch (cardType) {
			case "16":
				return "储值卡";
			case "17":
				return "记账卡";
		}
		return cardType;
	}

	public String getCardArea() {
		return cardArea == null ? "" : cardArea;
	}

	public void setCardArea(String cardArea) {
		this.cardArea = cardArea;
	}

	public String getCardNumber() {
		return cardNumber == null ? "" : cardNumber;
	}

	public void setCardNumber(String cardNumber) {
		this.cardNumber = cardNumber;
	}

	public String getValidity() {
		return validity == null ? "" : validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}

	public String getPlateNum() {
		return plateNum == null ? "" : plateNum;
	}

	public void setPlateNum(String plateNum) {
		this.plateNum = plateNum;
	}

	public String getStartDate() {
		return startDate == null ? "" : startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate == null ? "" : endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public String getCardVersion() {
		return cardVersion == null ? "" : cardVersion;
	}

	public void setCardVersion(String cardVersion) {
		this.cardVersion = cardVersion;
	}

	@Override
	public String toString() {
		return "TopUpCardInfo [cardArea=" + cardArea + ", cardNumber="
				+ cardNumber + ", validity=" + validity + ", plateNum="
				+ plateNum + "]";
	}

	public String getCardFrom() {
		return cardFrom;
	}

	public void setCardFrom(String cardFrom) {
		this.cardFrom = cardFrom;
	}

	public String getUserType() {
		if (TextUtils.isEmpty(userType)) {
			return "";
		}
		switch (userType) {
			case "00":
				return "普通车";
			case "01":
				return "普通车";
			case "06":
				return "公务车";
			case "08":
				return "军警车";
			case "10":
				return "紧急车";
			case "12":
				return "免费车";
			case "13":
				return "紧急车";
			case "14":
				return "车队";
			case "15":
				return "绿通车";
			case "16":
				return "联合收割机";
			case "17":
				return "抢险救灾";
			case "18":
				return "集装箱（仅货运）J1";
			case "19":
				return "大件运输车";
			case "0E":
				return "车队";
			case "1B":
				return "其他牵引车";
			case "1A":
				return "应急救援车";
			case "1C":
				return "集装箱（非仅货运）J2";
			case "0C":
				return "免费车";
		}
		return userType;
	}

	public void setUserType(String userType) {

		this.userType = userType;
	}

	public String getPlateColor() {
		if (TextUtils.isEmpty(plateColor)) {
			return "";
		}
		switch (plateColor) {
			case "00":
				return "蓝色";
			case "01":
				return "黄色";
			case "02":
				return "黑色";
			case "03":
				return "白色";
			case "04":
				return "渐变绿色";
			case "05":
				return "黄绿双拼色";
			case "06":
				return "蓝白渐变色";
		}
		return plateColor;
	}

	public void setPlateColor(String plateColor) {
		this.plateColor = plateColor;
	}

	public String getCarType() {
		if (TextUtils.isEmpty(carType)) {
			return "";
		}
		switch (carType) {
			case "00":
				return "未知";
			case "01":
				return "一型客车";
			case "02":
				return "二型客车";
			case "03":
				return "三型客车";
			case "04":
				return "四型客车";
			case "05":
				return "五型客车";
			case "06":
				return "六型客车";
			case "11":
				return "一型货车";
			case "12":
				return "二型货车";
			case "13":
				return "三型货车";
			case "14":
				return "四型货车";
			case "15":
				return "五型货车";
			case "16":
				return "六型货车";
			case "0B":
				return "一型货车";
			case "0C":
				return "二型货车";
			case "0D":
				return "三型货车";
			case "0E":
				return "四型货车";
			case "0F":
				return "五型货车";
			case "10":
				return "六型货车";
		}
		return carType;
	}

	public void setCarType(String carType) {
		this.carType = carType;
	}

}
